home *** CD-ROM | disk | FTP | other *** search
- /*******************************************************************
- * TEXTRA-AREXX script -- Mike Haas, 1993, Public Domain *
- * *
- * For use with TEXTRA, the GUI-based Amiga Text Editor. *
- * *
- * If you enhance or write your own Textra scripts, please send *
- * to me... especially if you want them added to the package. *
- *******************************************************************/
-
- /*
- ** This script is handy for JForth programmers.
- ** It requires version 1.15, rexx level 7, of Textra.
- **
- ** It will find, highlight and mark all colon definitions
- ** IF the ':' operator is in the 1st column.
- **
- ** Especially useful when assigned to a Textra Function
- ** key or CTRL-key macro.
- **
- ** Also processes :struct definitions, anything
- ** that begins with a ':' in the first column.
- ** (:CLASS, for example?)
- **
- ** Mike Haas, Oct 7, 1993
- **
- ** This program is hereby placed in the public domain.
- **
- */
-
- options results
-
- /*check Textra version, must be rexx level 7 at least for MARKSELECT */
- rex = 0; result = "NOTSUPPORTED"
- address 'TEXTRA' 'textraversion'
- parse var result maj min rex
- if (result == "NOTSUPPORTED") | (rex < 7) then do
- address 'TEXTRA' 'notify "This version of Textra cannot run this script."'
- exit
- end
-
- done = 0
-
- gotoxy 0 0
-
- do while (done == 0)
-
- checkcancel; if (result == CANCEL) then exit
-
- find ":"
- if result == "OK" then do
-
- get select position
- parse var result stx' 'sty' 'enx' 'eny
-
- if (stx == 0) then do
-
- hopselect next word
- get select text; parse var result zero' 'thename
- markselect thename
-
- /*
- ** Uncomment the next line if you want this script
- ** to exit after finding and marking one JForth word.
- */
-
- /* done = 1 */
- end
-
- end
- else
- done = 1
-
- end
-
-